Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 4 - Geometric Operations


Using Geometric Operations

This section shows you how to apply geometric operations to shapes. In particular, this section shows you how to

Many of the sample functions in this section create geometric shapes, and to do so, they specify geometric points for the shapes' geometries. Since a geometric point contains two fixed-point values, the sample functions in this section must convert integer constants to fixed-point constants when specifying a geometric point. QuickDraw GX provides the GXIntToFixed macro, which performs this conversion by shifting the integer value 16 bits to the left:

#define GXIntToFixed(a)  ((Fixed) (a) << 16)
QuickDraw GX also provides the ff macro as a convenient alias:

#define ff(a)  GXIntToFixed(a)
The ff macro is used throughout this section.


Subtopics
Determining and Reversing Contour Direction
Breaking Shape Contours
Eliminating Unnecessary Geometric Points
Simplifying Shapes
Converting a Shape to Primitive Form
Finding Geometric Information About a Shape
Setting a Shape's Bounding Rectangle
Insetting Shapes
Determining Whether Two Shapes Touch
Determining Whether One Shape Contains Another
Performing Geometric Arithmetic With Shapes

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help